package com.example.app1;

/**
 * 文本item
 */
public class Item {

    private String id;
    private String preId;
    private String nextId;
    private String content;
    private String title;
    private Item nextItem;

    private Item() {
    }

    public Item(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPreId() {
        return preId;
    }

    public void setPreId(String preId) {
        this.preId = preId;
    }

    public String getNextId() {
        return nextId;
    }

    public void setNextId(String nextId) {
        this.nextId = nextId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Item getNextItem() {
        return nextItem;
    }

    public void setNextItem(Item nextItem) {
        this.nextItem = nextItem;
    }

    @Override
    public String toString() {
        return "Item{" +
                "id='" + id + '\'' +
                ", preId='" + preId + '\'' +
                ", nextId='" + nextId + '\'' +
                ", title='" + title + '\'' +
                ", content='" + (content == null || content.length() < 20? content:content.substring(0, 20)) + '\'' +
                ", nextItem=" + nextItem +
                '}';
    }
}
